From 4e657b40923db3f84945e2a27c36cc5985fe0873 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Tue, 17 Oct 2006 15:49:05 -0600 Subject: [PATCH] [IA64] code cleanups A few more code cleanups Signed-off-by: Alex Williamson --- xen/arch/ia64/xen/privop.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/xen/arch/ia64/xen/privop.c b/xen/arch/ia64/xen/privop.c index 8c5ae00c27..be94c3d6f8 100644 --- a/xen/arch/ia64/xen/privop.c +++ b/xen/arch/ia64/xen/privop.c @@ -148,9 +148,11 @@ static IA64FAULT priv_itr_d(VCPU * vcpu, INST64 inst) //if (!vcpu_get_psr_ic(vcpu)) // return IA64_ILLOP_FAULT; - if ((fault = vcpu_get_itir(vcpu, &itir)) != IA64_NO_FAULT) + fault = vcpu_get_itir(vcpu, &itir); + if (fault != IA64_NO_FAULT) return IA64_ILLOP_FAULT; - if ((fault = vcpu_get_ifa(vcpu, &ifa)) != IA64_NO_FAULT) + fault = vcpu_get_ifa(vcpu, &ifa); + if (fault != IA64_NO_FAULT) return IA64_ILLOP_FAULT; pte = vcpu_get_gr(vcpu, inst.M42.r2); slot = vcpu_get_gr(vcpu, inst.M42.r3); @@ -163,9 +165,11 @@ static IA64FAULT priv_itr_i(VCPU * vcpu, INST64 inst) u64 fault, itir, ifa, pte, slot; //if (!vcpu_get_psr_ic(vcpu)) return IA64_ILLOP_FAULT; - if ((fault = vcpu_get_itir(vcpu, &itir)) != IA64_NO_FAULT) + fault = vcpu_get_itir(vcpu, &itir); + if (fault != IA64_NO_FAULT) return IA64_ILLOP_FAULT; - if ((fault = vcpu_get_ifa(vcpu, &ifa)) != IA64_NO_FAULT) + fault = vcpu_get_ifa(vcpu, &ifa); + if (fault != IA64_NO_FAULT) return IA64_ILLOP_FAULT; pte = vcpu_get_gr(vcpu, inst.M42.r2); slot = vcpu_get_gr(vcpu, inst.M42.r3); @@ -178,9 +182,11 @@ static IA64FAULT priv_itc_d(VCPU * vcpu, INST64 inst) u64 fault, itir, ifa, pte; //if (!vcpu_get_psr_ic(vcpu)) return IA64_ILLOP_FAULT; - if ((fault = vcpu_get_itir(vcpu, &itir)) != IA64_NO_FAULT) + fault = vcpu_get_itir(vcpu, &itir); + if (fault != IA64_NO_FAULT) return IA64_ILLOP_FAULT; - if ((fault = vcpu_get_ifa(vcpu, &ifa)) != IA64_NO_FAULT) + fault = vcpu_get_ifa(vcpu, &ifa); + if (fault != IA64_NO_FAULT) return IA64_ILLOP_FAULT; pte = vcpu_get_gr(vcpu, inst.M41.r2); @@ -192,9 +198,11 @@ static IA64FAULT priv_itc_i(VCPU * vcpu, INST64 inst) u64 fault, itir, ifa, pte; //if (!vcpu_get_psr_ic(vcpu)) return IA64_ILLOP_FAULT; - if ((fault = vcpu_get_itir(vcpu, &itir)) != IA64_NO_FAULT) + fault = vcpu_get_itir(vcpu, &itir); + if (fault != IA64_NO_FAULT) return IA64_ILLOP_FAULT; - if ((fault = vcpu_get_ifa(vcpu, &ifa)) != IA64_NO_FAULT) + fault = vcpu_get_ifa(vcpu, &ifa); + if (fault != IA64_NO_FAULT) return IA64_ILLOP_FAULT; pte = vcpu_get_gr(vcpu, inst.M41.r2); @@ -516,7 +524,8 @@ static IA64FAULT priv_mov_from_psr(VCPU * vcpu, INST64 inst) u64 val; IA64FAULT fault; - if ((fault = vcpu_get_psr(vcpu, &val)) == IA64_NO_FAULT) + fault = vcpu_get_psr(vcpu, &val); + if (fault == IA64_NO_FAULT) return vcpu_set_gr(vcpu, tgt, val, 0); else return fault; -- 2.30.2